
use $pathdata/Risk/Risk_cleaned.dta, clear

keep if outlier == 0

label var rocl "1 if compound"
label var inter_rocl_prob "Payout probability $\times$ 1 if compound lottery"

fvset base 1 session_no 
	
eststo clear
eststo: reg ce lottery_prob inter_rocl_prob rocl if gains==1 & rocl_set==1, cl(id)
eststo: reg ce lottery_prob inter_rocl_prob rocl $controls if gains==1 & rocl_set==1, cl(id)
eststo: reg ce lottery_prob inter_rocl_prob rocl inter_cu_prob cognitive_uncertainty if gains==1 & rocl_set==1, cl(id)
eststo: reg ce lottery_prob inter_rocl_prob rocl inter_cu_prob cognitive_uncertainty $controls if gains==1 & rocl_set==1, cl(id)


preserve
keep if baseline_set==1 
keep if outlier == 0
		
eststo clear
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty if gains==1, cl(id)
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty $controls if gains==1, cl(id)
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty if gains==0, cl(id)
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty $controls if gains==0, cl(id)
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty, cl(id)
eststo: reg abs_ce lottery_prob inter_cu_prob cognitive_uncertainty $controls, cl(id)

restore	


* Default Tables


use $pathdata/Risk/Risk_cleaned.dta, clear
keep if outlier == 0

label var low_default "1 if \textit{Low Default}"

eststo clear
eststo: reg abs_ce low_default if gains==1, cl(id)
eststo: reg abs_ce low_default inter_cu_default cognitive_uncertainty if gains==1, cl(id)
eststo: reg abs_ce low_default inter_cu_default cognitive_uncertainty $controls if gains==1 & outlier == 0, cl(id)

preserve
use $pathdata/Beliefs/Beliefs_cleaned.dta, clear
keep if outlier == 0

eststo: reg belief low_default if default_set==1, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty if default_set==1, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty $controls if default_set==1 & outlier == 0, cl(id)
restore


		
